package com.es.disped.dao.mapper;

import com.es.disped.dao.model.LoggingEventProperty;
import com.es.disped.dao.model.LoggingEventPropertyExample;
import com.es.disped.dao.model.LoggingEventPropertyKey;
import java.util.List;

import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

//@CacheNamespace(implementation=(com.es.disped.dao.cache.RedisCache.class),size=512,flushInterval=60000)
public interface LoggingEventPropertyMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=LoggingEventPropertySqlProvider.class, method="countByExample")
    long countByExample(LoggingEventPropertyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @DeleteProvider(type=LoggingEventPropertySqlProvider.class, method="deleteByExample")
    int deleteByExample(LoggingEventPropertyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Delete({
        "delete from logging_event_property",
        "where event_id = #{eventId,jdbcType=BIGINT}",
          "and mapped_key = #{mappedKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(LoggingEventPropertyKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Insert({
        "insert into logging_event_property (event_id, mapped_key, ",
        "mapped_value)",
        "values (#{eventId,jdbcType=BIGINT}, #{mappedKey,jdbcType=VARCHAR}, ",
        "#{mappedValue,jdbcType=LONGVARCHAR})"
    })
    int insert(LoggingEventProperty record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @InsertProvider(type=LoggingEventPropertySqlProvider.class, method="insertSelective")
    int insertSelective(LoggingEventProperty record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=LoggingEventPropertySqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="mapped_key", property="mappedKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mapped_value", property="mappedValue", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<LoggingEventProperty> selectByExampleWithBLOBs(LoggingEventPropertyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=LoggingEventPropertySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="mapped_key", property="mappedKey", jdbcType=JdbcType.VARCHAR, id=true)
    })
    List<LoggingEventProperty> selectByExample(LoggingEventPropertyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Select({
        "select",
        "event_id, mapped_key, mapped_value",
        "from logging_event_property",
        "where event_id = #{eventId,jdbcType=BIGINT}",
          "and mapped_key = #{mappedKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="mapped_key", property="mappedKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="mapped_value", property="mappedValue", jdbcType=JdbcType.LONGVARCHAR)
    })
    LoggingEventProperty selectByPrimaryKey(LoggingEventPropertyKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventPropertySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") LoggingEventProperty record, @Param("example") LoggingEventPropertyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventPropertySqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") LoggingEventProperty record, @Param("example") LoggingEventPropertyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventPropertySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") LoggingEventProperty record, @Param("example") LoggingEventPropertyExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=LoggingEventPropertySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(LoggingEventProperty record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table logging_event_property
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update logging_event_property",
        "set mapped_value = #{mappedValue,jdbcType=LONGVARCHAR}",
        "where event_id = #{eventId,jdbcType=BIGINT}",
          "and mapped_key = #{mappedKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(LoggingEventProperty record);
}